package descentFly.app.radar
{
	import UIFree.controls.uif_gbutton;
	import UIFree.controls.uif_hotspotButton;
	import UIFree.uif_Timer;
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;
	
	import descentFly.app.df_block;
	import descentFly.df_utils;
	
	import flash.geom.Point;
	import flash.geom.Rectangle;
	
	import space.sp_utils;
	
	public class df_radarMonitor extends uif_gbutton {
		private var _layer: df_radarLayer;
		public function df_radarMonitor(parent:uif_component, rect: Rectangle= null, a_styleClass:Object='block') {
			if (!rect) {
				rect = parent.getInner();
				var size	: int = rect.width>rect.height?rect.height:rect.width;
				rect = new Rectangle(rect.x + (rect.width - size) / 2,
									rect.y + (rect.height - size) / 2,
									size, size);
			}
			super(parent, rect.x, rect.y, rect.width, rect.height, 'monitor');
			_layer = new df_radarLayer(this, style.radarLayer);
			swapChildren(_layer, hotspot);
		}
	}
}